package Tiktok_three;

///**
// * 字节三面常考的算法：
// */
//public class Test {
//    /**
//     * 36进制由0-9，a-z，共36个字符表示，最小为'0'
//     * '0''9'对应十进制的09，'a''z'对应十进制的1035
//     * 例如：'1b' 换算成10进制等于 1 * 36^1 + 11 * 36^0 = 36 + 11 = 47
//     * 要求按照加法规则计算出任意两个36进制正整数的和
//     * 如：按照加法规则，计算'1b' + '2x' = '48'
//     * 要求：不允许把36进制数字整体转为10进制数字，计算出10进制数字的相加结果再转回为36进制
//     */
//    public static void main(String[] args) {
//        String result = addFunWithStr("1b", "2x");
//        System.out.println("原始解题方式:");
//        System.out.println("result = " + result);
//
////        System.out.println("api : ");
////        String a = "ab";
////        String b = "2x";
////        int i = Integer.parseInt(a, 36);
////        System.out.println("i---> "+i);
////        int i1 = Integer.parseInt(b, 36);
////        int sum = i + i1;
////        System.out.println("sum --- > "+sum);
////        String s = Integer.toString(sum, 36);
////        System.out.println(s);
//    }
//
//    /**
//     * 获取值
//     */
//    public static int getIntFromChar(char ch) {
//        int ret = -1;
//        if (ch >= '0' && ch <= '9') {
//            ret = ch - '0';
//        } else if (ch >= 'a' && ch <= 'z') {
//            ret = (ch - 'a') + 10;
//        }
//        return ret;
//    }
//
//    public static String addFunWithStr(String param1, String param2) {
//        StringBuffer stringBuffer = new StringBuffer();
//        String symbol = "0123456789abcdefghijklmnopqrstuvwxyz";
//        int param1Len = param1.length();
//        int param2Len = param2.length();
//        int i = param1Len - 1;
//        int j = param2Len - 1;
//        if (i < 0 || j < 0) {
//            return null;
//        }
//        int temp = 0;
//        while (i >= 0 && j >= 0) {
//            char ch_1 = param1.charAt(i);
//            char ch_2 = param2.charAt(j);
//            int v1 = getIntFromChar(ch_1);
//            int v2 = getIntFromChar(ch_2);
//            int ret = v1 + v2;
//            if (ret >= 36) {
//                int index = ret - 36 + temp;
//                char sv = symbol.charAt(index);
//                stringBuffer.append(sv);
//                temp = 1; //进位
//            } else {
//                int index = ret + temp;
//                char sv = symbol.charAt(index);
//                stringBuffer.append(sv);
//                temp = 0;
//            }
//            i--;
//            j--;
//        }
//        while (i >= 0) {
//            char ch_1 = param1.charAt(i);
//            stringBuffer.append(ch_1);
//            i--;
//        }
//        while (j >= 0) {
//            char ch_2 = param2.charAt(i);
//            stringBuffer.append(ch_2);
//            j--;
//        }
//        StringBuffer result = stringBuffer.reverse();
//        return result.toString();
//    }
//}

import java.util.Random;
import java.util.Scanner;

//AC了
public class Test {
    public static void main(String[] args) {
        int T;
        double x, y;
        double r;

        Random random = new Random();

        Scanner sc = new Scanner(System.in);
//        T = sc.nextInt();
//        while(T-->0) {
        x = sc.nextDouble();
        y = sc.nextDouble();
        //圆心
        PointW p = new PointW(x, y);



        //半径
        r = sc.nextDouble();

        x = sc.nextDouble();
        y = sc.nextDouble();
        PointW p1 = new PointW(x, y);

        x = sc.nextDouble();
        y = sc.nextDouble();
        PointW p2 = new PointW(x, y);

        boolean tag = go(p, r, p1, p2);
        if (tag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
//        }
    }

    private static boolean go(PointW p, double r, PointW p1, PointW p2) {
        /*
         * 为节省内存也能够只用两个点，不要Point类，x1,y1存储xy小值，而后排列组合就获得四个点了
         */
        double xmin = Math.min(p1.x, p2.x);
        double xmax = p1.x + p2.x - xmin;
        double ymin = Math.min(p1.y, p2.y);
        double ymax = p1.y + p2.y - ymin;

        //矩形四点；从左下角向上、向右，再向下
        PointW q1 = new PointW(xmin, ymin);
        PointW q2 = new PointW(xmin, ymax);
        PointW q3 = new PointW(xmax, ymax);
        PointW q4 = new PointW(xmax, ymin);

        boolean i = Double.compare(distance(p, q1), r) < 0;
        boolean j = Double.compare(distance(p, q2), r) < 0;
        boolean k = Double.compare(distance(p, q3), r) < 0;
        boolean t = Double.compare(distance(p, q4), r) < 0;

        //在圆内能够这样算，在圆外不能简单地把小于0改为大于0，考虑矩形贯穿圆
        if (xmax < p.x - r || ymin > p.y + r || xmin > p.x + r || ymax < p.y - r) {
            return false;
        } else if (i && j && k && t) {
            return false;
        } else if (p.y + r < ymax && p.y - r > ymin && p.x - r > xmin && p.x + r < xmax) {//在矩形内
            return false;
        } else {
            return true;
        }
    }

    private static double distance(PointW p, PointW p1) {
        return Math.hypot(p.x - p1.x, p.y - p1.y);
    }
}

class PointW {
    double x;
    double y;

    public PointW() {
        this.x = 0;
        this.y = 0;
    }

    public PointW(double x, double y) {
        this.x = x;
        this.y = y;
    }

}